Skip to content

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 16, 2025

Add proxy support for the new downloader

Summary

  • Implemented proxy support for the new Rust-based downloader
  • Enhanced llamacpp extension to use proxy settings from web app
  • Added unit tests for proxy utility functions

Changes

  • Rust downloader: Added ProxyConfig struct with SSL verification and no-proxy list support
  • llamacpp extension: Integrated proxy configuration from localStorage settings
  • Web app: Updated proxy settings to work with new downloader
  • Tests: Added unit tests for proxy functionality
CleanShot.2025-07-17.at.00.21.39.mp4

Test plan

  • Verify proxy configuration is properly passed to downloader
  • Test SSL verification options work correctly
  • Ensure no-proxy list bypasses proxy for specified domains
  • Validate proxy authentication with username/password

Important

Added proxy support for the Rust-based downloader, integrated proxy settings into llamacpp extension, and updated web app with comprehensive tests.

  • Behavior:
    • Added ProxyConfig struct in download.rs with SSL verification and no-proxy list support.
    • Integrated proxy settings from localStorage in llamacpp-extension.
    • Updated web app to support proxy settings for the new downloader.
  • Tests:
    • Added unit tests in util.test.ts for proxy configuration handling.
    • Added tests in download.rs for proxy validation and client creation.
  • Misc:
    • Removed tauri-driver installation from jan-linter-and-test.yml.
    • Added url dependency in Cargo.toml for URL parsing.

This description was created by Ellipsis for b5ab1ae. You can customize this summary. It will automatically update as commits are pushed.

@louis-jan louis-jan linked an issue Jul 16, 2025 that may be closed by this pull request
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 4eaeb32 in 2 minutes and 30 seconds. Click for details.
  • Reviewed 1531 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. extensions/download-extension/src/index.ts:31
  • Draft comment:
    Good integration: proxy config is now passed to downloadFiles in downloadFile. Consider documenting the expected proxy config shape in a code comment for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. extensions/llamacpp-extension/src/backend.ts:129
  • Draft comment:
    Proxy config is integrated into backend download items. Ensure that getProxyConfig behavior is consistent across extensions.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. extensions/llamacpp-extension/src/index.ts:611
  • Draft comment:
    Proxy config is now passed in model downloads. This is consistent; ensure any proxy setting changes update the UI accordingly.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. extensions/llamacpp-extension/src/util.test.ts:40
  • Draft comment:
    Comprehensive tests for getProxyConfig. Consider extracting common mock setup into a shared test helper to reduce repetition.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. extensions/llamacpp-extension/src/util.ts:64
  • Draft comment:
    Test expecting console.log output: getProxyConfig does not log any details. Either add logging or update the test accordingly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment seems to misunderstand the code - there is logging where it matters (error cases). The function is a utility that returns a config object, it doesn't need to log successful operations. The comment appears to be making assumptions about test requirements without strong evidence. We don't have context about what test they're referring to. Maybe there is a test somewhere that expects console.log output that I can't see? Maybe there's a logging standard in the codebase that requires logging successful operations? Without seeing the test in question or documentation about logging standards, we can't verify if this comment is valid. The function already logs errors appropriately. The comment should be deleted as it makes assumptions about testing/logging requirements without clear evidence, and the function already has appropriate error logging.
6. src-tauri/src/core/utils/download.rs:49
  • Draft comment:
    Proxy validation functions are well implemented. Consider caching the parsed URL to avoid double parsing in validate_proxy_config.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
7. src-tauri/src/core/utils/download.rs:160
  • Draft comment:
    Using proxy_config.no_proxy.as_deref().unwrap_or(&[]) is clear. Ensure that the wildcard matching in should_bypass_proxy meets enterprise requirements.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
8. web-app/src/routes/settings/https-proxy.tsx:44
  • Draft comment:
    Simplified proxy settings UI by removing calls to configurePullOptions; verify that downstream consumers pick up proxy settings from localStorage.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
9. web-app/src/services/models.ts:28
  • Draft comment:
    No specific changes regarding proxy support here; just ensure model operations are unaffected by proxy configuration changes.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_Yf2n091BKdZpThSO

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed b7be879 in 1 minute and 1 seconds. Click for details.
  • Reviewed 37 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/services/__tests__/models.test.ts:247
  • Draft comment:
    Removed tests for 'configurePullOptions'. Ensure that proxy configuration functionality is covered elsewhere to maintain test coverage.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment suggests ensuring that the proxy configuration functionality is covered elsewhere, which is a form of asking the author to ensure something is tested. This violates the rule against asking the author to ensure the change is tested.

Workflow ID: wflow_8I9rnxIguoi2GGb5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2025

Barecheck - Code coverage report

Total: 35.35%

Your code coverage diff: 0.03% ▴

Uncovered files and lines
FileLines
web-app/src/routes/settings/https-proxy.tsx1-11, 14-16, 18-42, 44-49, 51-59, 61-71, 74-86, 88-112, 114-115, 117, 119-123, 125-137, 139-140, 143-151, 153-161, 163-171, 173, 175-183, 185-193, 195-200, 202

@louis-jan louis-jan force-pushed the feat/proxy-support-for-the-new-downloader branch from b7be879 to b76b1d8 Compare July 17, 2025 14:29
Copy link
Contributor

@qnixsynapse qnixsynapse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far LGTM.

@louis-jan louis-jan force-pushed the feat/proxy-support-for-the-new-downloader branch 2 times, most recently from 85495ca to b7be879 Compare July 17, 2025 15:44
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed b5ab1ae in 1 minute and 35 seconds. Click for details.
  • Reviewed 37 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/jan-linter-and-test.yml:114
  • Draft comment:
    Removed redundant 'cargo install tauri-driver --locked' steps. Please confirm that tauri-driver is no longer needed in these jobs or is installed elsewhere to avoid breaking any tests.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_fD0RI9wdrTOkwoAN

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@louis-jan louis-jan merged commit 8ca507c into release/v0.7.0 Jul 17, 2025
16 checks passed
@louis-jan louis-jan deleted the feat/proxy-support-for-the-new-downloader branch July 17, 2025 16:10
@github-project-automation github-project-automation bot moved this to QA in Jan Jul 17, 2025
@github-actions github-actions bot added this to the v0.6.6 milestone Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

feat: [Download manager] Proxy support

3 participants